package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.core.validator.Const;
import org.jsola.hr.constant.EmpInfoRequireType;

import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.EmpWorkRequireExample.E_COMPANY;
import static org.jsola.hr.example.EmpWorkRequireExample.E_END_TIME;
import static org.jsola.hr.example.EmpWorkRequireExample.E_LEAVE_REASON;
import static org.jsola.hr.example.EmpWorkRequireExample.E_POSITION;
import static org.jsola.hr.example.EmpWorkRequireExample.E_START_TIME;
import static org.jsola.hr.example.EmpWorkRequireExample.E_WIT_NAME;
import static org.jsola.hr.example.EmpWorkRequireExample.E_WIT_PHONE;
import static org.jsola.hr.example.EmpWorkRequireExample.M_COMPANY_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpWorkRequireExample.M_END_TIME_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpWorkRequireExample.M_LEAVE_REASON_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpWorkRequireExample.M_POSITION_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpWorkRequireExample.M_START_TIME_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpWorkRequireExample.M_WIT_NAME_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpWorkRequireExample.M_WIT_PHONE_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpWorkRequireExample.N_COMPANY;
import static org.jsola.hr.example.EmpWorkRequireExample.N_END_TIME;
import static org.jsola.hr.example.EmpWorkRequireExample.N_LEAVE_REASON;
import static org.jsola.hr.example.EmpWorkRequireExample.N_POSITION;
import static org.jsola.hr.example.EmpWorkRequireExample.N_START_TIME;
import static org.jsola.hr.example.EmpWorkRequireExample.N_WIT_NAME;
import static org.jsola.hr.example.EmpWorkRequireExample.N_WIT_PHONE;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【公司员工工作经历所需信息】的参数")
@Data
public class EmpWorkRequireUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_COMPANY, example = E_COMPANY, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_COMPANY_ENUM_NOT_MATCH)
    private Integer company;

    @ApiModelProperty(notes = N_POSITION, example = E_POSITION, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_POSITION_ENUM_NOT_MATCH)
    private Integer position;

    @ApiModelProperty(notes = N_START_TIME, example = E_START_TIME, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_START_TIME_ENUM_NOT_MATCH)
    private Integer startTime;

    @ApiModelProperty(notes = N_END_TIME, example = E_END_TIME, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_END_TIME_ENUM_NOT_MATCH)
    private Integer endTime;

    @ApiModelProperty(notes = N_LEAVE_REASON, example = E_LEAVE_REASON, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_LEAVE_REASON_ENUM_NOT_MATCH)
    private Integer leaveReason;

    @ApiModelProperty(notes = N_WIT_NAME, example = E_WIT_NAME, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_WIT_NAME_ENUM_NOT_MATCH)
    private Integer witName;

    @ApiModelProperty(notes = N_WIT_PHONE, example = E_WIT_PHONE, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_WIT_PHONE_ENUM_NOT_MATCH)
    private Integer witPhone;


}

